#ifndef LOGGER_H
#define LOGGER_H
#include <QDir>
#include <QDirIterator>
#include <QDateTime>
#include <QFile>
#include <QTextStream>
#include <QMutexLocker>
#include <QObject>
#include <QMutex>
#include <QString>
#include <QtGlobal>
#include "Config.h" 
enum class LogLevel
{
	Debug,
	Info,
	Warning,
	Critical,
	Fatal
};

class Logger : public QObject
{
	Q_OBJECT

public:
	explicit Logger(QObject *parent = nullptr);

	void setLogLevel(LogLevel level);
	void clearOverTimeLogFile();
	static void outputMessage(QtMsgType type, const QMessageLogContext &context, const QString &msg);
public slots:
	

private:
	static LogLevel m_logLevel;
	static QMutex m_mutex;
};

#endif // LOGGER_H
